<?php
/* @var $this ContentsController */
/* @var $dataProvider CActiveDataProvider */

$this->breadcrumbs=array(
	'Contents',
);

$this->menu=array(
	array('label'=>'Create Contents', 'url'=>array('create')),
	array('label'=>'Manage Contents', 'url'=>array('admin')),
);
?>

<h1>Contents</h1>
<div>
	<?php foreach($models as $model){?>
		<div class="post">
			<h2 class="entry_title"><?php echo CHtml::link($model->title,array('site/view','id'=>$model->cid));?></h2>
			<p class="entry_data">
				<span>作者：</span>
				<span>发布时间：</span>
				<span>分类：</span>
			</p>
			<p>
		<?php
			$this->beginWidget('CMarkdown', array('purifyOutput'=>true));
			echo $model->text;
			$this->endWidget();
		?>
			</p>        
		</div>
	
	<?php }?>
</div>
<?php 
	$this->widget('CLinkPager',array(
		'header' => '', 
		'pages' => $pages, 
	));  

	$this->widget('CListPager',array(
		'header' => '', 
		'pages' => $pages, 
	));  

?>
